import java.util.Scanner;

public class test8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数组个数:");
        int n = sc.nextInt();
        System.out.println("请输入数组的各个数据:");
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        boolean flag = getS(arr);
        System.out.println(flag);
    }
    public static boolean getS(int[] arr){
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]%2==1){
                count++;
            }else {
                count = 0;
            }
            if (count==3){
                return true;
            }
        }
    return false;
    }
}
